﻿/******************************************************************************
 *  作者：       Administrator
 *  创建时间：   2013/5/12 17:06:02
 *
 *
 ******************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace CollectionAndShare
{
    /// <summary>
    /// Document.xaml 的交互逻辑
    /// </summary>
    public partial class Document : UserControl
    {
        public Document()
        {
            InitializeComponent();

            this.lstDocument.ItemsSource = DocumentObject.CreateCollections();

        }


    }

    public class DocumentObject
    {
        public string Icon { get; set; }

        public string Name { get; set; }

        public string Date { get; set; }

        public DocumentObject(string icon, string name, string date)
        {
            this.Icon = icon;
            this.Name = name;
            this.Date = date;
        }

        public static List<DocumentObject> CreateCollections()
        {
            List<DocumentObject> listCollection = new List<DocumentObject>();
            for (int i = 0; i < 100; i++)
            {
                DocumentObject collection = new DocumentObject("Img/Clipboard-file.png", "WPF Doment" + i, DateTime.Now.ToShortDateString());
                listCollection.Add(collection);
            }            
            return listCollection;           
        }

        
    }
}
